﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tracker.Domain.Entities;

namespace Tracker.Data.DataContext
{
    public class DataContext : DbContext, IDataContext
    {
        public IDbSet<Address> Addresses { get; set; }
        public IDbSet<Position> Positions { get; set; }
        public IDbSet<User> Users { get; set; }

        public DataContext()
            : base("Tracker")
        {

        }

        public IDbSet<T> CreateDbSet<T>() where T : class
        {
            return Set<T>();
        }

        public new void Save()
        {
            SaveChanges();
        }
    }
}
